/*
 * FieldProxy.scala
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.squela

/**
 * Proxy trait that fowards all methods of trait Field[T] to another object field.
 */
trait FieldProxy[T] extends Field[T] {
    def field: Field[T]

    def name: String = field.name
    def length: Int = field.length
    def unique: Boolean = field.unique
    def optional: Boolean = field.optional
    def fieldType: Class[T] = field.fieldType
    def resource = field.resource.asInstanceOf[ResourceType]
}
